<?php

abstract class HTML_Fluent_XHTML_Element_Base_STYLE extends HTML_Fluent_Element {

    /**
     * The name of this element
     *
     * @return string
     */
    public function getName() {
        return 'style';
    }

    protected $attributes = array(
        'dir' => null,
        'id' => null,
        'lang' => null,
        'media' => null,
        'title' => null,
        'type' => null,
    );


    /**
     * Set the value of the 'dir' attribute.
     *
     * @param string|null $value
     * @return HTML_Fluent_XHTML_Element_STYLE
     */
    public function dir($value) {
        return $this->setAttribute('dir', $value);
    }

    /**
     * Set the value of the 'id' attribute.
     *
     * @param string|null $value
     * @return HTML_Fluent_XHTML_Element_STYLE
     */
    public function id($value) {
        return $this->setAttribute('id', $value);
    }

    /**
     * Set the value of the 'lang' attribute.
     *
     * @param string|null $value
     * @return HTML_Fluent_XHTML_Element_STYLE
     */
    public function lang($value) {
        return $this->setAttribute('lang', $value);
    }

    /**
     * Set the value of the 'media' attribute.
     *
     * @param string|null $value
     * @return HTML_Fluent_XHTML_Element_STYLE
     */
    public function media($value) {
        return $this->setAttribute('media', $value);
    }

    /**
     * Set the value of the 'title' attribute.
     *
     * @param string|null $value
     * @return HTML_Fluent_XHTML_Element_STYLE
     */
    public function title($value) {
        return $this->setAttribute('title', $value);
    }

    /**
     * Set the value of the 'type' attribute.
     *
     * @param string|null $value
     * @return HTML_Fluent_XHTML_Element_STYLE
     */
    public function type($value) {
        return $this->setAttribute('type', $value);
    }

    /**
     * Add a child text node
     *
     * @param string $string
     * @return HTML_Fluent_XHTML_Element_STYLE
     */
    public function text($string) {
        $this->childNodes[] = new HTML_Fluent_Text($string);
        return $this;
    }

}
